From df434db70ef3c029bbe0bc3c5580445c471584c3 Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Wed, 18 Feb 2004 12:43:23 +0000 Subject: [PATCH] Fix bug reported by Nam SungHyun. Wed Feb 18 13:28:57 2004 Soeren Sandmann Fix bug reported by Nam SungHyun. * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): Don't use a cached GC here since the function needs to modify the foreground color. * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back to NULL on the cached GC. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gdk/gdkpixbuf-render.c | 3 ++- gdk/gdkwindow.c | 2 ++ 7 files changed, 59 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0eaf4aac39..b13a29e0c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Wed Feb 18 13:28:57 2004 Soeren Sandmann + + Fix bug reported by Nam SungHyun. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): + Don't use a cached GC here since the function needs to modify the + foreground color. + + * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back + to NULL on the cached GC. + 2004-02-17 Federico Mena Quintero * gtk/gtkfilechooserdialog.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0eaf4aac39..b13a29e0c1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Wed Feb 18 13:28:57 2004 Soeren Sandmann + + Fix bug reported by Nam SungHyun. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): + Don't use a cached GC here since the function needs to modify the + foreground color. + + * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back + to NULL on the cached GC. + 2004-02-17 Federico Mena Quintero * gtk/gtkfilechooserdialog.c diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0eaf4aac39..b13a29e0c1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Wed Feb 18 13:28:57 2004 Soeren Sandmann + + Fix bug reported by Nam SungHyun. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): + Don't use a cached GC here since the function needs to modify the + foreground color. + + * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back + to NULL on the cached GC. + 2004-02-17 Federico Mena Quintero * gtk/gtkfilechooserdialog.c diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0eaf4aac39..b13a29e0c1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Wed Feb 18 13:28:57 2004 Soeren Sandmann + + Fix bug reported by Nam SungHyun. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): + Don't use a cached GC here since the function needs to modify the + foreground color. + + * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back + to NULL on the cached GC. + 2004-02-17 Federico Mena Quintero * gtk/gtkfilechooserdialog.c diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0eaf4aac39..b13a29e0c1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Wed Feb 18 13:28:57 2004 Soeren Sandmann + + Fix bug reported by Nam SungHyun. + + * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): + Don't use a cached GC here since the function needs to modify the + foreground color. + + * gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back + to NULL on the cached GC. + 2004-02-17 Federico Mena Quintero * gtk/gtkfilechooserdialog.c diff --git a/gdk/gdkpixbuf-render.c b/gdk/gdkpixbuf-render.c index b93fac33cc..0065ed13f8 100644 --- a/gdk/gdkpixbuf-render.c +++ b/gdk/gdkpixbuf-render.c @@ -83,7 +83,6 @@ gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, return; gc = gdk_gc_new (bitmap); - gc = _gdk_drawable_get_scratch_gc (GDK_DRAWABLE (bitmap), FALSE); if (!pixbuf->has_alpha) { @@ -132,6 +131,8 @@ gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, start + dest_x, y + dest_y, x - 1 + dest_x, y + dest_y); } + + g_object_unref (gc); } diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 4d278dcc24..817aba27a4 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1033,6 +1033,8 @@ gdk_window_end_paint (GdkWindow *window) clip_box.x - x_offset, clip_box.y - y_offset, clip_box.width, clip_box.height); + gdk_gc_set_clip_region (tmp_gc, NULL); + g_object_unref (paint->pixmap); gdk_region_destroy (paint->region); g_free (paint); -- 2.30.2